﻿#pragma once
#include "sdl_sub.h"

class image :
	public sdl_sub
{
public:
	SDL_Surface * img_surface;
	SDL_Surface * main_screen;
	SDL_Rect offset;
	SDL_Rect set_xy;
	int set_x;
	int set_y;
	int sprite;
	int sprite_count;
	bool flag_img;


	image(void);
	image(SDL_Surface * input_surface, SDL_Surface *screen);
	image(std::string filename,SDL_Surface *screen);
	image(std::string filename,SDL_Surface *screen, int r, int g, int b);
	image(std::string filename,SDL_Surface *screen, int r, int g, int b, int sprite_count);
	int colorkey(int r, int g, int b);
	bool load(std::string filename);
	bool load(SDL_Surface * input_surface);
	SDL_Surface *load_image(std::string filename);
	~image(void);
	void init_var();	
	int set(int x=0, int y=0, int sel = 0);
	int set(SDL_Rect offset, int in_x = 0, int in_y = 0);
	int image::sprite_change(int sel, int range, int input);
};
